home *** CD-ROM | disk | FTP | other *** search
/ Aminet 19 / Aminet 19 (1997)(GTI - Schatztruhe)[!][Jun 1997].iso / Aminet / comm / maxs / dfbv13.lha / dfb / Developers / includes / dfb.i < prev   
Text File  |  1992-09-02  |  12KB  |  400 lines

  1.  
  2.     IFND    DFB_DFB_I
  3. DFB_DFB_I    SET    1
  4.  
  5. **
  6. **    $Filename: dfb/dfb.i $
  7. **    $Release: 1.2 $
  8. **
  9. **    
  10. **    (C) Copyright 1994-6, Andrew Leppard
  11. **
  12. **        This file may be freely copied as long as it is in no way
  13. **      altered.
  14.     
  15.  
  16.     IFND EXEC_TYPES_I
  17.     INCLUDE "exec/types.i"
  18.     ENDC
  19.  
  20.  
  21. *----------------------------------------------------------------
  22. *
  23. *   Dynamic File Base - File Node Structure
  24. *
  25. *----------------------------------------------------------------
  26.  
  27.  
  28.  STRUCTURE    FB,0    
  29.     UWORD    FB_LENGTH            * length of this node 
  30.     UBYTE    FB_MIN                * time of upload ( mins after hour )
  31.     UBYTE    FB_HOUR                *                  ( hour after day )
  32.     UBYTE    FB_DAY                * date of upload
  33.     UBYTE    FB_MONTH            
  34.     UWORD    FB_YEAR                
  35.     ULONG    FB_FILESIZE            * Size of file
  36.     UWORD    FB_SECTION            * DFB file section (65,000+ reserved)
  37.     UWORD    FB_DOWN                * number of d/ls
  38.     UBYTE    FB_STATUS            * See below
  39.     UBYTE    FB_pad
  40.     ULONG    FB_FUTURE            * future expansion
  41.     UWORD    FB_NAMELEN            * length of file name -
  42.     UWORD    FB_DESCLEN            * length of description
  43.     UWORD    FB_UPLOADERLEN        * length of uploader's name
  44.     UWORD    FB_ALIASLEN            * length of uploader's alias
  45.     APTR    FB_NAME                * file name 
  46.     APTR    FB_DESC                * file description
  47.     APTR    FB_UPLOADER            * uploader's name  
  48.     APTR    FB_ALIAS            * uploader's alias  
  49.     LABEL    FB_SIZEOF            
  50.  
  51.  
  52. ATSTART    EQU        0                * Position file base at start
  53. ATEND    EQU        -$1                * Position file base at end
  54. CUSTOMSTART    EQU    2                * Position file base at start - custom dfb.data file supplied in D1
  55.  
  56. STARTLOCK    EQU    "EXLU"            * Position file base at start and have exclusive access
  57. OLD_USER    EQU    0                * Return code from GetUser, 0=old user
  58. NEW_USER    EQU    1                * 1=had to create it
  59. FORCE_RETN    EQU    $f0                * For file descriptions/upload sigs include this
  60.                                 * before to make sure its on a seperate line            
  61. QUICKMODE    EQU    "QUIK"
  62.  
  63. *------ FB_STATUS bit definitions:
  64.  
  65.  
  66.     BITDEF    FB,DELETED,0        * file has been deleted
  67.     BITDEF    FB,LOCKED,1            * file is locked
  68.     BITDEF    FB,PUBLIC,2            * file is public
  69.     BITDEF    FB,FREE,3            * file is a free download
  70.     BITDEF    FB,OFFLINE,4        * file is stored offline
  71.     BITDEF    FB,ASTALAVISTA,5    * file node should be ignored 
  72.     BITDEF    FB,MOVED,6            * file has been moved/shifted 
  73.     BITDEF    FB,NEEDSDESC,7        * file needs user to type in a description
  74.  
  75.  
  76. *------ Display Node early stop bits
  77.  
  78.  
  79.     BITDEF    AF,STATUS,0            * After status
  80.  
  81.  
  82. *------ FindFile options
  83.  
  84.  
  85.     BITDEF    FF,POS,0            * Find position of file as well
  86.     BITDEF    FF,PARTIAL,1        * Find file from partial text (NOT IMPLEMENTED)
  87.     BITDEF    FF,CONT,2            * Continue search from position in d1 (NOT IMPLEMENTED)
  88.  
  89.  
  90. *------ Handle structure returned after call OpenFileBase
  91.  
  92. BUFFER_SIZE    EQU    20*1024            * 20Kb
  93. MAX_NODE_SIZE    EQU    3200        * Maximum size a node can be
  94.  
  95.  STRUCTURE    OF,0
  96.      ULONG    OF_FILEHANDLE        * File handle of dfbdata:dfb.data
  97.     UWORD    OF_LENGTH            * Length of node just read (0 if at start)
  98.      UWORD    OF_NEXTLENGTH        * Length of next file node (0 if at last)
  99.     ULONG    OF_ENTRY            * Node # of NEXT file node (this does not count nodes marked with ASTALAVISTA)
  100.     ULONG    OF_FILES            * Number of files in file base
  101.     APTR    OF_PREFERENCES        * Pointer to current preferences data
  102.  
  103.     STRUCT    OF_TEMP,FB_SIZEOF    * Internal data/free ram space
  104.     STRUCT    OF_PREFREE,1*4    
  105.     STRUCT    OF_FREE,33*4    
  106.     STRUCT    OF_MOREFREE,6*4
  107.     STRUCT    OF_OTHERFREE,33*4
  108.     ULONG    OF_POINTER            
  109.     ULONG    OF_POINTER2
  110.     STRUCT    OF_DISPLAY,30        * For DisplayNode function 
  111.     STRUCT    OF_SMALL,100
  112.     STRUCT    OF_LASTFREE,32
  113.  
  114.     LABEL    OF_SIZEOFFAKE        * The rest of this data is for V1.01+
  115.  
  116.     LABEL    OF_S_NODES            * Nodes
  117.     ULONG    OF_NODESIZE            * How many bytes in of_nodes are used
  118.     LABEL    OF_S_NODEPTR        * Pointer to nodes
  119.     ULONG    OF_WHERE            * Where are we ?
  120.     LABEL    OF_S_NODEAT            * Node we are at
  121.  
  122.     STRUCT    OF_NODES,BUFFER_SIZE
  123.                                 * 15K for node data 
  124.  
  125.     ULONG    OF_COLPOINTER        * Pointer to colour table, if you want
  126.                                 * Display node to use a custom table fix this
  127.                                 * pointer to your table and dfb.library will
  128.                                 * happily use the new table
  129.     LABEL    OF_SIZEOF            * THIS VALUE WILL CHANGE DO NOT TRUST IT!!!!
  130.  
  131.   
  132. *----- Returned from GetFilePaths() V2
  133.  
  134.  STRUCTURE FP,0
  135.      APTR    FP_MEM1709            * Ptr to file paths from MAX's config file
  136.      APTR    FP_MEM                * Ptr to file paths from file path file
  137.      APTR    FP_MEMSIZE            * Size of memory
  138.     UBYTE    FP_BUSY                * If !=0 then DFB is loading file paths
  139.  
  140.      LABEL    FP_SIZEOF
  141.  
  142. *----------------------------------------------------------------
  143. *
  144. *   Dynamic File Base - Preferences
  145. *
  146. *----------------------------------------------------------------
  147.  
  148. COMPSIZE1    EQU    200                * Length of first compressed max data size
  149. COMPSIZE2    EQU    200
  150. COMPSIZE3    EQU    100
  151. COMPSIZE4    EQU    50
  152.  
  153.  STRUCTURE    PF,0          
  154.     STRUCT    PF_HEADER,50        * Header saying which version etc
  155.     ULONG    PF_LENGTH            * Length of preferences
  156.     APTR    PF_SECTIONS            * Pointer to first section
  157.     UBYTE    PF_OPTIONS            * Various options     
  158.     UBYTE    PF_OPTIONS2            * Other options
  159.  
  160.     UBYTE    PF_DAY                * Last time user manager was run
  161.     UBYTE    PF_MONTH            
  162.     UWORD    PF_YEAR                
  163.  
  164.     UBYTE    PF_FREQUENCY        * How many days between file manager updates
  165.     UBYTE    PF_RATIOTYPE        * Type of file ratio (see below)
  166.  
  167.     STRUCT    PF_ARCHDIR,40        * Directory of archivers
  168.     STRUCT    PF_ARCHBAK,40        * Archive backup file name?
  169.     STRUCT    PF_DESCEDITOR,40    * Sysop file editor - description editor prog
  170.     STRUCT    PF_LAYOUT1,40        * Names of the files with the compressed data
  171.     STRUCT    PF_LAYOUT2,40
  172.     STRUCT    PF_LAYOUT3,40
  173.     STRUCT    PF_LAYOUT4,40
  174.  
  175.     UWORD    PF_DEFRATIO1        * Default login ratios
  176.     UWORD    PF_DEFRATIO2
  177.     UWORD    PF_DEFRATIO3        
  178.     UWORD    PF_DEFRATIO1ST        * Standard ratios
  179.     UWORD    PF_DEFRATIO2ST
  180.     UWORD    PF_DEFRATIO3ST
  181.     UWORD    PF_DEFRATIO1E        * Enhanced member ratios
  182.     UWORD    PF_DEFRATIO2E
  183.     UWORD    PF_DEFRATIO3E
  184.  
  185.     UWORD    PF_MDAYSST            * Membership days (Standard)
  186.     UWORD    PF_MDAYSE            *                  (Enhanced)
  187.     UWORD    PF_MACCESSST        * Membership access (Standard)
  188.     UWORD    PF_MACCESSE            *                     (Enhanced)    
  189.     UWORD    PF_ACCESS            * Non-member (drop down) access
  190.  
  191.     UWORD    PF_TIME                * Non-member time limit
  192.     UWORD    PF_MTIMEST            * Members time limit (Standard)
  193.     UWORD    PF_MTIMEE            *                    (Enhanced)
  194.  
  195.     STRUCT    PF_EXT1,12            * Extensions (max 3)
  196.     STRUCT    PF_EXTR1,40            * How to extract file_id.dizs
  197.     STRUCT    PF_UP1,40            * What to do on upload
  198.     STRUCT    PF_LIST1,40            * How to handle file view
  199.     
  200.     STRUCT    PF_EXT2,12
  201.     STRUCT    PF_EXTR2,40
  202.     STRUCT    PF_UP2,40
  203.     STRUCT    PF_LIST2,40
  204.     
  205.     STRUCT    PF_EXT3,12    
  206.     STRUCT    PF_EXTR3,40    
  207.     STRUCT    PF_UP3,40    
  208.     STRUCT    PF_LIST3,40    
  209.     
  210.     STRUCT    PF_EXT4,12    
  211.     STRUCT    PF_EXTR4,40    
  212.     STRUCT    PF_UP4,40    
  213.     STRUCT    PF_LIST4,40    
  214.     
  215.     STRUCT    PF_EXT5,12
  216.     STRUCT    PF_EXTR5,40
  217.     STRUCT    PF_UP5,40
  218.     STRUCT    PF_LIST5,40
  219.  
  220.     STRUCT    PF_EXT6,12
  221.     STRUCT    PF_EXTR6,40
  222.     STRUCT    PF_UP6,40
  223.     STRUCT    PF_LIST6,40
  224.  
  225.     STRUCT    PF_EXT7,12
  226.     STRUCT    PF_EXTR7,40
  227.     STRUCT    PF_UP7,40
  228.     STRUCT    PF_LIST7,40
  229.  
  230.     STRUCT    PF_EXT8,12
  231.     STRUCT    PF_EXTR8,40
  232.     STRUCT    PF_UP8,40
  233.     STRUCT    PF_LIST8,40
  234.  
  235.     STRUCT    PF_EXT9,12
  236.     STRUCT    PF_EXTR9,40
  237.     STRUCT    PF_UP9,40
  238.     STRUCT    PF_LIST9,40
  239.  
  240.     STRUCT    PF_EXT10,12
  241.     STRUCT    PF_EXTR10,40
  242.     STRUCT    PF_UP10,40
  243.     STRUCT    PF_LIST10,40
  244.  
  245.     UBYTE    PF_FDAY                * Last file manager
  246.     UBYTE    PF_FMONTH            
  247.     UWORD    PF_FYEAR            
  248.  
  249.     UBYTE    PF_DFBFILES            * Settings of DFBCheck's cycle gadgets
  250.     UBYTE    PF_HDFILES
  251.  
  252.     STRUCT    PF_FUTURE,5            * Reserved
  253.     UBYTE    PF_DEFAULT            * Row to use if no extension (0=do nothing)
  254.     
  255.     STRUCT    PF_COMPRESSED1,COMPSIZE1    * How the data is displayed (LONG)
  256.     STRUCT    PF_COMPRESSED2,COMPSIZE2    * (LONG)
  257.     STRUCT    PF_COMPRESSED3,COMPSIZE3    * (SHORT)
  258.     STRUCT    PF_COMPRESSED4,COMPSIZE4    * (V.SHORT)
  259.  
  260.     STRUCT  PF_UPLOADDIR,40     * Default upload directory
  261.     STRUCT  PF_FUTURE2,10      
  262.    
  263.      LABEL    PF_SIZE
  264.      
  265.      
  266. FILERATIO    EQU    0                * Ratio system being used
  267. BYTERATIO    EQU    1
  268. CREDITRATIO    EQU    2    
  269.  
  270. ARC_EXTENSIONS    EQU    10          * Number of dif. extensions possible
  271.  
  272.  
  273. *------ PF_OPTIONS bit definitions:
  274.  
  275.  
  276.     BITDEF    PF,DELONPURGE,0        * Delete files on purge or else before
  277.     BITDEF    PF,NEWFILESPUBLIC,2    * Make new files public?
  278.     BITDEF    PF,FILEID,3            * Use file_ids?
  279.     BITDEF    PF,RATIO12,4        * Ratios 1 & 2 are linked (1=yes)
  280.     BITDEF    PF,RATIO23,5        * Ratios 2 & 3 are linked
  281.     BITDEF    PF,RATIO13,6        * Ratios 1 & 3 are linked 
  282.     BITDEF    PF,WBTOFRONT,7        * Workbench to front on file desc editing
  283.  
  284.  
  285. *------ PF_OPTIONS2 bit definitions:
  286.  
  287.  
  288.     BITDEF    PF,ENHTOSTAND,0        * After enhanced membership exp go to standard?
  289.     BITDEF    PF,HEADERS,1        * Use file headers?
  290.     
  291.     BITDEF    PF,SHOWOFFLINE,2    * DFBCheck - show offline files?
  292.     BITDEF    PF,SHOWDELETED,3    * DFBCheck - show deleted files?
  293.  
  294.  
  295. *------ Colour table (used for DisplayNode() )
  296.  
  297.  
  298.  STRUCTURE    COLTABLE,0
  299.      UBYTE    CT_IDENT            * The Letter C Colour table!
  300.      UBYTE    CT_IDENT2            * The Number 1 V1
  301.     ULONG    CT_TEXT                * Text to display (optional)
  302.     UBYTE    CT_ALIAS            * Alias colour "0"+0->7
  303.     UBYTE    CT_FILENAME            * File name colour
  304.     UBYTE    CT_HIGHLIGHT        * File name colour when highlighted
  305.     UBYTE    CT_UPLOADER            * Uploader colour
  306.     UBYTE    CT_DESCRIPTION        * Description colour
  307.     UBYTE    CT_SIZE                * File size colour
  308.     UBYTE    CT_DATE                * Date colour
  309.     UBYTE    CT_TIMES            * Times uploaded colour
  310.     ULONG    CT_EXTRA            * you never know...
  311.     ULONG    CT_EXTRA2
  312.     ULONG    CT_EXTRA3            * you still dont know...
  313.     LABEL    COLTABLE_SIZEOF
  314.  
  315.  
  316. *------ Compressed data format:
  317.  
  318.  
  319.  STRUCTURE    CMP,0
  320.      STRUCT    CMP_HEADER,8        * text: 'DFB_COMP'
  321.     UBYTE    CMP_DESCLINES        * Max number of description lines displayed
  322.     UBYTE    CMP_DESCWIDTH        * Width of first (all) description lines
  323.     STRUCT    CMP_CMPDATA,90        * Compressed data 
  324.     LABEL    CMP_SIZEOF
  325.  
  326.     STRUCT    CMP_CMPDATAL,100    * Extra 100 bytes if its long format
  327.     LABEL    CMP_SIZEOF_LONG
  328.  
  329. *------ Section data
  330.  
  331.      
  332.  STRUCTURE    SE,0
  333.     UWORD    SE_NUMBER            * Section Number
  334.     APTR    SE_NEXTSECTION        * Pointer to next section
  335.     UWORD    SE_ACCESSACCESS        * Access needed to access section
  336.     UWORD    SE_VIEWACCESS        * Access needed to view files
  337.     UWORD    SE_REMOTEACCESS        * Access needed for user to edit files
  338.      UWORD    SE_READACCESS        * Access needed for user to see extra stuff about files         
  339.     UWORD    SE_UPLOADACCESS        * Access needed for user to u/l
  340.     UWORD    SE_DOWNLOADACCESS    * Access needed for user to d/l
  341.     UWORD    SE_WHEN                * When files are shifted (0=never shifted)
  342.     UWORD    SE_WHERE            * Where do files go? (0=To Heaven)
  343.     UWORD    SE_MAXMBS            * Maximum number of megabytes in file section (0=no limit)
  344.      STRUCT    SE_NAME,40            * Section name
  345.     STRUCT    SE_HOME,40            * Upload directory, main directory
  346.     UWORD    SE_CURRENT            * Current size in MBs (*CAUTION*)
  347.     UBYTE    SE_RATIO            * Ratio used in section (1,2 or 3)
  348.     UBYTE    SE_STATUS            * Status of file section (see below)
  349.     ULONG    SE_LASTSIZE            * Reserved
  350.     LABEL    SE_SIZEOF
  351.  
  352.  
  353. *------ SE_STATUS bit definitions:
  354.  
  355.  
  356.     BITDEF    SE,OFFLINE,0        * Section has been taken offline
  357.     BITDEF    SE,SIGS,2            * Use upload signatures?
  358.     BITDEF    SE,NAME,3            * Print uploader name
  359.     BITDEF    SE,ALIAS,4            * Print uploader alias 
  360.     BITDEF    SE,FREE,5            * Section is free download area
  361.     BITDEF    SE,CDROMDAT,6        * Section has different dfb.data file
  362.  
  363.  
  364. *----------------------------------------------------------------
  365. *
  366. *   Dynamic File Base - User Statistics
  367. *
  368. *----------------------------------------------------------------
  369.  
  370.  
  371.  STRUCTURE    US,0
  372.     STRUCT    US_NAME,42            * Name of user
  373.     UWORD    US_ACCESS            * Current access level
  374.     UWORD    US_RATIO1            * File Ratio (Link #1)
  375.     UWORD    US_RATIO2            * File Ratio (Link #2)
  376.     UWORD    US_RATIO3            * File Ratio (Link #3)
  377.     UWORD    US_DAYSLEFT            * Days left before account expires (0=doesnt expire)
  378.     UWORD    US_TIMELIMIT        * Daily time limit
  379.  
  380.     UBYTE    US_MIN                * the date which user is up to listing the
  381.     UBYTE    US_HOUR                * files
  382.     UBYTE    US_DAY                
  383.     UBYTE    US_MONTH            
  384.     UWORD    US_YEAR                * And year! (not V1.00)
  385.  
  386.     ULONG    US_DLS1                * downloads L1 (Link #1)
  387.     ULONG    US_DLS2                * downloads L2
  388.     ULONG    US_DLS3                * downloads L3
  389.     ULONG    US_ULS1                * uploads L1
  390.     ULONG    US_ULS2                * uploads L2
  391.     ULONG    US_ULS3                * uploads L3
  392.  
  393.     UWORD    US_DESCRIPTIONS        * File descriptions to be entered (V1.12)
  394.     STRUCT    US_FUTURE,8            * Future upgrades
  395.     STRUCT    US_SIGNATURE,100    * Signature to append to end of file description
  396.     LABEL    US_SIZEOF
  397.     
  398.     ENDC        
  399.     
  400.